#ifndef GAMELOGIC_H
#define GAMELOGIC_H

#include <QWidget>
#include "stdshared.h"
#include "qipan.h"
class GameLogic : public QWidget
{
    Q_OBJECT
public:
    explicit GameLogic(QWidget *parent = nullptr);

    //判断角色是否获胜
    bool checkWin(int row, int col, Role role);

    //设置棋盘信息
    void setQipanBoard(Role ** board, int boardSize);

    //人机移动
    void ComputerMove();
private:
    //评估该点对玩家的值
    int evaluateMove(int row, int col, Role role);

signals:
    void AiPostion(int row, int col);

private:
    //玩家是1 人机是2
    Role **m_board;
    int m_boardSize;


};

#endif // GAMELOGIC_H
